<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>
    Add Zato as a web framework : Forums : PythonAnywhere
</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Forums : PythonAnywhere">
        <meta name="author" content="PythonAnywhere LLP">
        <meta name="google-site-verification" content="O4UxDrfcHjC44jybs2vajc1GgRkTKCTRgVzeV6I9V14" />

        <!-- Le styles -->
        <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
        <link href="/static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
        <link href="/static/anywhere/styles/bootstrap_base.css" rel="stylesheet">
        
    
    <link rel="stylesheet" href="/static/anywhere/styles/forums.css" type="text/css" media="screen" charset="utf-8" />

    <link rel="stylesheet" href="/static/pygments/style.css" type="text/css" media="screen" charset="utf-8" />

        <link rel="stylesheet" href="/static/jquery/jquery-ui-1.8.11.custom.css" type="text/css" media="screen" charset="utf-8" />
        
    
    <link rel="alternate" type="application/rss+xml" title="RSS" href="/forums/topic/799/rss" />

        <style type="text/css">
            body {
                height: auto;
            }
        </style>
        <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
        <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- Le fav and touch icons -->
        <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
        <link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
        <link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
    </head>

     <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div id="id_internal_nav_bar_container" class="container">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="/"><img id="id_logo" src="/static/anywhere/images/logo-234x35.png" height="35" title="PythonAnywhere logo" alt="PythonAnywhere logo" /></a>
                    <div class="nav-collapse">
                        <ul id="id_header_links" class="nav">
                            <li><a id="id_feedback_link" class='feedback_link' href="">Send feedback</a></li>
                            <li><a id="id_forums_link" href="/forums/">Forums</a></li>
                            <li><a href="/wiki/" id="id_help_link">Help</a></li>
                            <li><a href="http://blog.pythonanywhere.com/" id="id_blog_link">Blog</a></li>
                            
                            
                                <li><a style="font-weight: bold;" href="/pricing/" id="id_pricing_link">Pricing & signup</a></li>
                                <li><a href="/login/?next=/forums/topic/799/" id="id_login_link">Log in</a></li>
                            
                        </ul>
                    </div>
                </div>
            </div>
        </div>

        <div class="top-container" id="id_dummy"></div>

        

        
    
    <div class="container">
        <div class="row">
            <div class="span8 offset3">
                <h1>PythonAnywhere Forums</h1>
            </div>
        </div>



    <div class="row">
        <div class="span8 offset3">
            <p>
                <a href="/forums/start_topic/" id="id_start_new_topic">Start a new topic</a> |
                <a href="/forums/">Back to all topics</a> |
                <a href="/forums/topic/799/rss">This topic's RSS</a>
            </p>
        </div>
    </div>
    <div class="row">
        <div class="span8 offset3 topic">
            <h2>Add Zato as a web framework</h2>
        </div>
    </div>

    
        <div class="row">
            <div id="id_post_5672" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5672_content_text" class="span8">
                        <p>Please add Zato as a web framework.  It is an integration framework that can be found at zato.io</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5672_creator_details">
                            
                                
                                    <img src="/static/anywhere/images/star.gif" alt="Beloved premium user" title="Beloved premium user"/>
                                
                            
                            pruggera
                            |
                            1
                            post
                            |
                            
                        </span>
                        <span id="id_post_5672_created_date">
                            July 28, 2013, 9:10 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5672">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5691" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5691_content_text" class="span8">
                        <p>Hi pruggera, </p>
<p>Unfortunately this would be a very complicated thing to make available to all users. Our web frameworks are all currently WSGI applications. Zato is a combination of various other services (including Redis and HAProxy) rather than a simple WSGI application. Adding it would require a drastic re-architecture of PythonAnywhere. It could be something that we support in the future but it would be some time away.  </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5691_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5691_created_date">
                            July 29, 2013, 4:09 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5691">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5695" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5695_content_text" class="span8">
                        <p>Hello friends,</p>
<p>I'm the author of Zato and just wanted to say that should you ever need any help with porting it to PythonAnywhere's infrastructure I'd be very happy to help you out in any way I can. My email is dsuch at zato.io</p>
<p>Zato indeed features and supports a lot of technologies but as far as WSGI and HTTP go, it is based on gevent/gunicorn and to some extent can be treated as a plain WSGI deamon around which other protocols and data access methods have been added. But cluster's core servers, the place where main loops are spinning, are usually in gevent/gunicorn/WSGI (I'm saying 'usually' because there's more to it, but this is the core). </p>
<p>So it's certainly doable and should you ever need a hand, please just drop me an email! :-)</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5695_creator_details">
                            
                                
                            
                            dsuch
                            |
                            3
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5695_created_date">
                            July 29, 2013, 11:46 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5695">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5700" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5700_content_text" class="span8">
                        <p>Hi dsuch, </p>
<p>Thanks for the letting us know! It looks like a really interesting framework. At the moment all web apps are served by uWSGI workers. Can Zato simply provide a WSGI application object? Would this result in anything useful?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5700_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5700_created_date">
                            July 30, 2013, 9:50 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5700">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5715" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5715_content_text" class="span8">
                        <p>Hello hansel,</p>
<p>please have a look at on_wsgi_request which is the WSGI application object</p>
<p>https://github.com/zatosource/zato/blob/master/code/zato-server/src/zato/server/base/parallel.py#L94</p>
<p>but a bit tougher question is indeed how much one can do with it.</p>
<p>There would be no clustering, AMQP, FTP, ZeroMQ, Redis, JMS WebSphere MQ, statistics, load-balancing, fail-over, management console, command line interface and well, many features would be missing.</p>
<p>Zato is really much more than a framework, it's a complete server-side environment that goes well beyond WSGI so a lot depends on whether you'd allow for</p>
<ol>
<li>Redis (I understand it's not the case right now)</li>
<li>using gevent</li>
<li>starting own threads</li>
<li>starting own subprocesses</li>
</ol>
<p>There's a lot of background greenlets/threads/processes possibly running within a Zato cluster and it's kind of difficult to create everything as a simple WSGI callable (I didn't know you were using uWSGI, I thought any WSGI-based app would do, not that you needed a WSGI app object).</p>
<p>Another thing is how to provide, for instance, load-balacing and HA. Zato has it built in and it's through a component started separately from servers. Assuming it's not added, how will PythonAnywhere provide it? Do you offer load-balacing with HAProxy too? (Sorry, I've never used your services)</p>
<p>Assuming you could possibly add support for these 4 things (at least 1-3) then I think that after some refactoring on my part this could result in a nice, yet limited, development environment for HTTP only.</p>
<p>On the other hand, creating a new Zato quickstart environment like in this article takes some 6-10 seconds from command line</p>
<p>http://www.infoq.com/articles/zato</p>
<div class="codehilite"><pre><span class="err">$</span> <span class="n">zato</span> <span class="n">quickstart</span> <span class="n">create</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">qs</span><span class="o">-</span><span class="mi">1</span> <span class="n">postgresql</span> <span class="n">localhost</span> <span class="mi">5432</span> <span class="n">zato1</span> <span class="n">zato1</span> <span class="n">localhost</span> <span class="mi">6379</span>

<span class="n">ODB</span> <span class="n">database</span> <span class="n">password</span> <span class="p">(</span><span class="n">will</span> <span class="n">not</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">)</span><span class="o">:</span>
<span class="n">Enter</span> <span class="n">the</span> <span class="n">odb_password</span> <span class="n">again</span> <span class="p">(</span><span class="n">will</span> <span class="n">not</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">)</span><span class="o">:</span>

<span class="n">Key</span><span class="o">/</span><span class="n">value</span> <span class="n">database</span> <span class="n">password</span> <span class="p">(</span><span class="n">will</span> <span class="n">not</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">)</span><span class="o">:</span>
<span class="n">Enter</span> <span class="n">the</span> <span class="n">kvdb_password</span> <span class="n">again</span> <span class="p">(</span><span class="n">will</span> <span class="n">not</span> <span class="n">be</span> <span class="n">echoed</span><span class="p">)</span><span class="o">:</span>

<span class="p">[</span><span class="mi">1</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">Certificate</span> <span class="n">authority</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">2</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">ODB</span> <span class="n">schema</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">3</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">ODB</span> <span class="n">initial</span> <span class="n">data</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">4</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">server1</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">5</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">server2</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">6</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">Load</span><span class="o">-</span><span class="n">balancer</span> <span class="n">created</span>
<span class="n">Superuser</span> <span class="n">created</span> <span class="n">successfully</span><span class="p">.</span>
<span class="p">[</span><span class="mi">7</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">Web</span> <span class="n">admin</span> <span class="n">created</span>
<span class="p">[</span><span class="mi">8</span><span class="o">/</span><span class="mi">8</span><span class="p">]</span> <span class="n">Management</span> <span class="n">scripts</span> <span class="n">created</span>
<span class="n">Quickstart</span> <span class="n">cluster</span> <span class="n">quickstart</span><span class="o">-</span><span class="mi">309837</span> <span class="n">created</span>
<span class="n">Web</span> <span class="n">admin</span> <span class="n">user</span><span class="o">:</span><span class="p">[</span><span class="n">admin</span><span class="p">],</span> <span class="n">password</span><span class="o">:</span><span class="p">[</span><span class="n">hita</span><span class="o">-</span><span class="n">yabe</span><span class="o">-</span><span class="n">yenb</span><span class="o">-</span><span class="n">ounm</span><span class="p">]</span>
<span class="n">Start</span> <span class="n">the</span> <span class="n">cluster</span> <span class="n">by</span> <span class="n">issuing</span> <span class="n">the</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">qs</span><span class="o">-</span><span class="mi">1</span><span class="o">/</span><span class="n">zato</span><span class="o">-</span><span class="n">qs</span><span class="o">-</span><span class="n">start</span><span class="p">.</span><span class="n">sh</span> <span class="n">command</span>
<span class="n">Visit</span> <span class="n">https</span><span class="o">:</span><span class="c1">//zato.io/support for more information and support options</span>
<span class="err">$</span>
</pre></div>


<p>CLI allows to run all commands in no-questions-asked mode with parameters read from file </p>
<p>https://zato.io/docs/admin/cli/from-config.html</p>
<p>so this is how creating new environments can be automated.</p>
<p>Well. Hm.. I guess the question is how much demand you will have and what sort of environments you'd like to create. Full-blown ones or limited to HTTP only? Would it be actually for production or mostly for development with disclaimers that many core features are missing.</p>
<p>I'm really happy you find it an interesting project but I'm afraid not much really will fit into a single WSGI callable. This could be still be usable to some extent but many useful parts would be left off.</p>
<p>What do you think, hansel?</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5715_creator_details">
                            
                                
                            
                            dsuch
                            |
                            3
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5715_created_date">
                            July 30, 2013, 9:34 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5715">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5718" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5718_content_text" class="span8">
                        <p>Hmm... as you say. It's not something that we could easily incorporate. We do front end load balancing already and we need each users web applications to not care about the machine they are running on. Zato sounds like a great full stack application that just wouldn't fit into what we do right now. Though our future plans for the platform would make it viable. </p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5718_creator_details">
                            
                                <img src="/static/anywhere/images/staff.png" alt="Staff" title="Staff"/>
                            
                            hansel
                            |
                            435
                            posts
                            |
                            
                                PythonAnywhere staff
                                |
                            
                        </span>
                        <span id="id_post_5718_created_date">
                            July 31, 2013, 7:08 a.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5718">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    
        <div class="row">
            <div id="id_post_5744" class="span8 offset3 post">
                <div class="row">
                    <div id="id_post_5744_content_text" class="span8">
                        <p>Sure, I only meant to illustrate it how you, as in PythonAnywhere, can easily create new environments in an automated way. Users would need no access to CLI at all.</p>
<p>If you could think about supporting gevent and Redis, that would be a great way to start thinking about it all. But I understand this may take a while.</p>
<p>In any case, please contact me any time should you reach that point - I'd really like to make it as easy as possible for service providers to offer Zato among other packages.</p>
<p>Thanks!</p>
                    </div>
                </div>
                <div class="row">
                    <div class="span7 post_metadata">
                        <span id="id_post_5744_creator_details">
                            
                                
                            
                            dsuch
                            |
                            3
                            posts
                            |
                            
                        </span>
                        <span id="id_post_5744_created_date">
                            Aug. 1, 2013, 8:56 p.m.
                        </span>
                        |
                        <a href="https://www.pythonanywhere.com/forums/topic/799/#id_post_5744">permalink</a>
                    </div>
                    <div class="span1">
                        
                    </div>
                </div>
            </div>
        </div>
    

    




        <div id="id_footer" class="container">

            <footer id="id_copyright_div">
                <p>
                    Copyright &copy; 2013 PythonAnywhere LLP
                    &mdash;
                    <a href="/terms/">Terms</a>
                    &mdash;
                    <a href="/privacy/">Privacy</a><br/>
                    "Python" is a registered trademark of the Python Software Foundation.
                </p>
            </footer>

        </div>

        
        

        <div id="id_feedback_dialog" title="Help us improve" style="display:none">
    <div id="id_feedback_dialog_blurb_big" class="dialog_blurb_big">
        It's always a pleasure to hear from you!
    </div>
    <div id="id_feedback_dialog_blurb_small">
        Ask us a question, or tell us what you love or hate about PythonAnywhere.<br/>
        We'll get back to you over email ASAP.
    </div>
    <textarea id="id_feedback_dialog_text" rows="6"></textarea>
    <input id="id_feedback_dialog_email_address" type="text" class="default_prompt"/>
    <div id="id_feedback_dialog_error" class="pa_hidden">
        Sorry, there was an error connecting to the server. <br/>Please try again in a few moments...
    </div>
    <div class="dialog_buttons">
        <img id="id_feedback_dialog_spinner" src="/static/anywhere/images/spinner-small.gif" />
        <button class="btn btn-primary" id="id_feedback_dialog_ok_button">OK</button>
        <button class="btn" id="id_feedback_dialog_cancel_button">Cancel</button>
    </div>
</div>


        <!-- Le javascript
        ================================================== -->
        <!-- Placed at the end of the document so the pages load faster -->
        <script type="text/javascript" src="/static/jquery/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="/static/jquery/jquery-ui-1.8.11.custom.min.js"></script>
        <script src="/static/bootstrap/js/bootstrap-transition.js"></script>
        <script src="/static/bootstrap/js/bootstrap-alert.js"></script>
        <script src="/static/bootstrap/js/bootstrap-modal.js"></script>
        <script src="/static/bootstrap/js/bootstrap-dropdown.js"></script>
        <script src="/static/bootstrap/js/bootstrap-scrollspy.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tab.js"></script>
        <script src="/static/bootstrap/js/bootstrap-tooltip.js"></script>
        <script src="/static/bootstrap/js/bootstrap-popover.js"></script>
        <script src="/static/bootstrap/js/bootstrap-button.js"></script>
        <script src="/static/bootstrap/js/bootstrap-collapse.js"></script>
        <script src="/static/bootstrap/js/bootstrap-carousel.js"></script>
        <script src="/static/bootstrap/js/bootstrap-typeahead.js"></script>

        <script type="text/javascript">
            var urls = {};
            var Anywhere = {};
            Anywhere.urls = {};
        </script>
        <script type="text/javascript" src="/static/anywhere/scripts/ajax_utils.js"></script>

        <script type="text/javascript" src="/static/anywhere/scripts/feedback_dialog.js"></script>
        
        <script type="text/javascript">
            $(function() {
                $.extend(
                    urls,
                    {
                        feedback: '/feedback/submit/'
                    }
                );
                
                    Anywhere.FeedbackDialog.Initialise(urls, false);
                
            });
        </script>

        <script type="text/javascript">

            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-18014859-6']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

        </script>

        



    </body>
</html>
